import { Component } from '@angular/core';

declare var form: any;

@Component({
  templateUrl: './bpm.define.html'
})
export class BpmDefineComponent {

  fs: any = null;
  ffs: any = null;

  dic2: any = null;
  dic3: any = null;

  constructor() {
    // 注册表单
    this.fs = new form.FormSideSimpleService('bpmconfig', {
      orderObject: { actDefName: 0, version: 0 },
      keyField: 'id',
      randomFields: ['id'],
      foreignKey: 'group'
    });
    // 文件服务
    this.ffs = new form.FileService();

    this.dic2 = new form.DictionaryService('b_bpmtype');
    this.dic3 = new form.DictionaryService('b_group');
    this.dic3.loadAll();
  }

  editRow(item) {
    window.open('#bpm_bpmdefinfo_mis?info=true&id=' + item.id);
  }
}
